package com.ityy.ruiji.dao;

import com.ityy.ruiji.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishFlavorDao {

    void batchInsert(@Param("flavorList") List<DishFlavor> flavorList);

    @Select("select * from dish_flavor where dish_id =#{dishId}")
    List<DishFlavor> findById(Long id);

    @Delete("delete from dish_flavor where dish_id=#{dishId}")
    void deleteByDishId(Long id);
}
